﻿
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sproc_BBSDeleteItem]') AND type in (N'P', N'PC'))
    DROP PROCEDURE [dbo].[sproc_BBSDeleteItem];
GO
CREATE PROCEDURE [dbo].[sproc_BBSDeleteItem]
    @item_id int
/*

===================================================
功能:    删除帖子
参数:
    @item_id int        :    帖子ID
===================================================

*/
AS
--删除帖子的回复
DELETE FROM uds_bbs_replay 
    WHERE item_id = @item_id
--删除帖子
DELETE FROM uds_bbs_forumitem
    WHERE item_id = @item_id